Purpose
The convertTimeToEpoch task converts a date/timestamp to Epoch Time, which is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT).
Potential Use Case
Use this task reference if a workflow is designed to provide an input timestamp to a downstream interface or system that requires the Epoch Time format.
Properties
Input and output properties are shown below.
| Incoming | Type | Description | 
|---|---|---|
| inputTime | Object | Required. The date/timestamp to convert. | 
| EpochFormat | Enum | Required. Represents the Epoch format in which the inputTimeis converted. Allowed values are "Seconds" or "Milliseconds". | 
| Outgoing | Type | Description | 
|---|---|---|
| epochTime | Number | The converted date/timestamp value since January 1, 1970 (midnight UTC/GMT). Reformatted into "Seconds" or "Milliseconds" (as designated by the EpochFormatproperty). | 
Example 1
In this IAP example:
- The - inputTimevariable is provided by the output of- getTime, a reference task located elsewhere in the workflow. The reference variable provided by the- getTimetask is- time.
- The - EpochFormatproperty variable is set to- Seconds.
- For this example, the - epochTimevalue produced upon output will be the value of the- inputTimein the format of seconds since January 1, 1970. 
Example 2
In this IAP example:
- The - inputTimevariable is provided by the output of- getTime, a reference task located elsewhere in the workflow. The reference variable provided by the- getTimetask is- time.
- The - EpochFormatproperty variable is set to- Milliseconds.
- For this example, the - epochTimevalue produced upon output will be the value of the- inputTimein the format of milliseconds since January 1, 1970. 
Manual Reference Variable Entry (inputTime)
To enter the inputTime object manually, use the format below for Year-Month-Date-Time ("yyyy-MM-dd 'T' HH:mm:ss.SSSZ").
{"time": "2021-02-26T15:00:00.000Z"}This format shows as:
2021-02-25 03:00.00